<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<?php include("include/header.php");?>
<card id="page-<?php echo $post->ID;?>" title="<?php echo $post->title; ?> | <?php echo $this->setting->blogname; ?>">
<?php 
if(isset($comment) && isset($comment->Message)) {
	echo "评论发表" . (is_numeric($comment->Message) ? "成功!" : "失败：" . $comment->Message);
	echo "<br/>";
}
?>
<?php echo $nav; ?><br/>
<?php echo $post->title; ?><br/><br/>
<?php
	$cc = array();
	$page = $this->get('paged') > 0 ? $this->get('paged') : 1;
	if($post->password=='' || $this->check_post_password($post->ID)) {
		$cc = $this->wapPagedContent($post->content, 1000, 800);
		$content = isset($cc[$page-1]) ? $cc[$page-1] : $cc[0];
		$content = preg_replace('/\[OBJECT\]/i', '[视频/音频]', $content);
		echo $content;
	} else {
		include("include/password.php");
	}
?><br/>
<?php
if(!empty($cc) && count($cc) > 1){
	$pager = new cmsdream_pager($this->get_paged_link(), $page);
	$pager->setPagesize(1);
	$pager->setTotal(count($cc));
	echo "分页:";
	$pager->prevWords = array('text'=>'上一页','title'=>'');
	$pager->nextWords = array('text'=>'下一页','title'=>'');
	$pager->render();
	echo "<br/>";
}
?><br/>
<?php include("include/comment.php");?>
<?php include("include/footer.php");?>
</card>
</wml>